﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Net.Sockets;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using HslCommunication.BasicFramework;
using HslCommunication.Core;
using HslCommunication.Core.IMessage;
using HslCommunication.Core.Net;
using HslCommunication.Reflection;

namespace HslCommunication.CNC.Fanuc
{
	/// <summary>
	/// 一个FANUC的机床通信类对象
	/// </summary>
	// Token: 0x02000180 RID: 384
	public class FanucSeries0i : NetworkDoubleBase
	{
		/// <summary>
		/// 根据IP及端口来实例化一个对象内容
		/// </summary>
		/// <param name="ipAddress">Ip地址信息</param>
		/// <param name="port">端口号</param>
		// Token: 0x06001F4B RID: 8011 RVA: 0x00097A22 File Offset: 0x00095C22
		public FanucSeries0i(string ipAddress, int port = 8193)
		{
			this.IpAddress = ipAddress;
			this.Port = port;
			base.ByteTransform = new ReverseBytesTransform();
		}

		/// <inheritdoc />
		// Token: 0x06001F4C RID: 8012 RVA: 0x00097A48 File Offset: 0x00095C48
		protected override INetMessage GetNewNetMessage()
		{
			return new CNCFanucSeriesMessage();
		}

		/// <inheritdoc />
		// Token: 0x06001F4D RID: 8013 RVA: 0x00097A50 File Offset: 0x00095C50
		protected override OperateResult InitializationOnConnect(Socket socket)
		{
			OperateResult<byte[]> operateResult = this.ReadFromCoreServer(socket, "a0 a0 a0 a0 00 01 01 01 00 02 00 02".ToHexBytes(), true, true);
			bool flag = !operateResult.IsSuccess;
			OperateResult result;
			if (flag)
			{
				result = operateResult;
			}
			else
			{
				OperateResult<byte[]> operateResult2 = this.ReadFromCoreServer(socket, "a0 a0 a0 a0 00 01 21 01 00 1e 00 01 00 1c 00 01 00 01 00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00".ToHexBytes(), true, true);
				bool flag2 = !operateResult2.IsSuccess;
				if (flag2)
				{
					result = operateResult2;
				}
				else
				{
					result = OperateResult.CreateSuccessResult();
				}
			}
			return result;
		}

		/// <inheritdoc />
		// Token: 0x06001F4E RID: 8014 RVA: 0x00097AB4 File Offset: 0x00095CB4
		protected override OperateResult ExtraOnDisconnect(Socket socket)
		{
			return this.ReadFromCoreServer(socket, "a0 a0 a0 a0 00 01 02 01 00 00".ToHexBytes(), true, true);
		}

		/// <inheritdoc />
		// Token: 0x06001F4F RID: 8015 RVA: 0x00097ADC File Offset: 0x00095CDC
		[DebuggerStepThrough]
		protected override Task<OperateResult> InitializationOnConnectAsync(Socket socket)
		{
			FanucSeries0i.<InitializationOnConnectAsync>d__4 <InitializationOnConnectAsync>d__ = new FanucSeries0i.<InitializationOnConnectAsync>d__4();
			<InitializationOnConnectAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult>.Create();
			<InitializationOnConnectAsync>d__.<>4__this = this;
			<InitializationOnConnectAsync>d__.socket = socket;
			<InitializationOnConnectAsync>d__.<>1__state = -1;
			<InitializationOnConnectAsync>d__.<>t__builder.Start<FanucSeries0i.<InitializationOnConnectAsync>d__4>(ref <InitializationOnConnectAsync>d__);
			return <InitializationOnConnectAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc />
		// Token: 0x06001F50 RID: 8016 RVA: 0x00097B28 File Offset: 0x00095D28
		[DebuggerStepThrough]
		protected override Task<OperateResult> ExtraOnDisconnectAsync(Socket socket)
		{
			FanucSeries0i.<ExtraOnDisconnectAsync>d__5 <ExtraOnDisconnectAsync>d__ = new FanucSeries0i.<ExtraOnDisconnectAsync>d__5();
			<ExtraOnDisconnectAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult>.Create();
			<ExtraOnDisconnectAsync>d__.<>4__this = this;
			<ExtraOnDisconnectAsync>d__.socket = socket;
			<ExtraOnDisconnectAsync>d__.<>1__state = -1;
			<ExtraOnDisconnectAsync>d__.<>t__builder.Start<FanucSeries0i.<ExtraOnDisconnectAsync>d__5>(ref <ExtraOnDisconnectAsync>d__);
			return <ExtraOnDisconnectAsync>d__.<>t__builder.Task;
		}

		// Token: 0x06001F51 RID: 8017 RVA: 0x00097B74 File Offset: 0x00095D74
		private double GetFanucDouble(byte[] content, int index)
		{
			return this.GetFanucDouble(content, index, 1)[0];
		}

		// Token: 0x06001F52 RID: 8018 RVA: 0x00097B94 File Offset: 0x00095D94
		private double[] GetFanucDouble(byte[] content, int index, int length)
		{
			double[] array = new double[length];
			for (int i = 0; i < length; i++)
			{
				int num = base.ByteTransform.TransInt32(content, index + 8 * i);
				int num2 = (int)base.ByteTransform.TransInt16(content, index + 8 * i + 6);
				bool flag = num == 0;
				if (flag)
				{
					array[i] = 0.0;
				}
				else
				{
					array[i] = Math.Round((double)num * Math.Pow(0.1, (double)num2), num2);
				}
			}
			return array;
		}

		// Token: 0x06001F53 RID: 8019 RVA: 0x00097C20 File Offset: 0x00095E20
		private byte[] CreateFromFanucDouble(double value)
		{
			byte[] array = new byte[8];
			int value2 = (int)(value * 1000.0);
			base.ByteTransform.TransByte(value2).CopyTo(array, 0);
			array[5] = 10;
			array[7] = 3;
			return array;
		}

		/// <summary>
		/// 主轴转速及进给倍率<br />
		/// Spindle speed and feedrate override
		/// </summary>
		/// <returns>主轴转速及进给倍率</returns>
		// Token: 0x06001F54 RID: 8020 RVA: 0x00097C64 File Offset: 0x00095E64
		[HslMqttApi(Description = "Spindle speed and feedrate override")]
		public OperateResult<double, double> ReadSpindleSpeedAndFeedRate()
		{
			OperateResult<byte[]> operateResult = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
			{
				this.BuildReadSingle(164, 3, 0, 0, 0, 0),
				this.BuildReadSingle(138, 1, 0, 0, 0, 0),
				this.BuildReadSingle(136, 3, 0, 0, 0, 0),
				this.BuildReadSingle(136, 4, 0, 0, 0, 0),
				this.BuildReadSingle(36, 0, 0, 0, 0, 0),
				this.BuildReadSingle(37, 0, 0, 0, 0, 0),
				this.BuildReadSingle(164, 3, 0, 0, 0, 0)
			}));
			bool flag = !operateResult.IsSuccess;
			OperateResult<double, double> result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<double, double>(operateResult);
			}
			else
			{
				List<byte[]> list = this.ExtraContentArray(operateResult.Content.RemoveBegin(10));
				result = OperateResult.CreateSuccessResult<double, double>(this.GetFanucDouble(list[5], 14), this.GetFanucDouble(list[4], 14));
			}
			return result;
		}

		/// <summary>
		/// 读取程序名及程序号<br />
		/// Read program name and program number
		/// </summary>
		/// <returns>程序名及程序号</returns>
		// Token: 0x06001F55 RID: 8021 RVA: 0x00097D58 File Offset: 0x00095F58
		[HslMqttApi(Description = "Read program name and program number")]
		public OperateResult<string, int> ReadSystemProgramCurrent()
		{
			OperateResult<byte[]> operateResult = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
			{
				this.BuildReadSingle(207, 0, 0, 0, 0, 0)
			}));
			bool flag = !operateResult.IsSuccess;
			OperateResult<string, int> result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<string, int>(operateResult);
			}
			else
			{
				List<byte[]> list = this.ExtraContentArray(operateResult.Content.RemoveBegin(10));
				int value = base.ByteTransform.TransInt32(list[0], 14);
				string value2 = Encoding.Default.GetString(list[0].SelectMiddle(18, 36)).TrimEnd(new char[1]);
				result = OperateResult.CreateSuccessResult<string, int>(value2, value);
			}
			return result;
		}

		/// <summary>
		/// 读取宏变量，可以用来读取刀具号<br />
		/// Read macro variable, can be used to read tool number
		/// </summary>
		/// <param name="number">刀具号</param>
		/// <returns>读宏变量信息</returns>
		// Token: 0x06001F56 RID: 8022 RVA: 0x00097E04 File Offset: 0x00096004
		[HslMqttApi(Description = "Read macro variable, can be used to read tool number")]
		public OperateResult<double> ReadSystemMacroValue(int number)
		{
			return ByteTransformHelper.GetResultFromArray<double>(this.ReadSystemMacroValue(number, 1));
		}

		/// <summary>
		/// 读取宏变量，可以用来读取刀具号<br />
		/// Read macro variable, can be used to read tool number
		/// </summary>
		/// <param name="number">宏变量地址</param>
		/// <param name="length">读取的长度信息</param>
		/// <returns>是否成功</returns>
		// Token: 0x06001F57 RID: 8023 RVA: 0x00097E24 File Offset: 0x00096024
		[HslMqttApi(ApiTopic = "ReadSystemMacroValueArray", Description = "Read macro variable, can be used to read tool number")]
		public OperateResult<double[]> ReadSystemMacroValue(int number, int length)
		{
			int[] array = SoftBasic.SplitIntegerToArray(length, 5);
			int num = number;
			List<byte> list = new List<byte>();
			OperateResult<double[]> result;
			for (int i = 0; i < array.Length; i++)
			{
				OperateResult<byte[]> operateResult = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
				{
					this.BuildReadSingle(21, num, num + array[i] - 1, 0, 0, 0)
				}));
				bool flag = !operateResult.IsSuccess;
				if (flag)
				{
					result = OperateResult.CreateFailedResult<double[]>(operateResult);
					return result;
				}
				list.AddRange(this.ExtraContentArray(operateResult.Content.RemoveBegin(10))[0].RemoveBegin(14));
				num += array[i];
			}
			try
			{
				result = OperateResult.CreateSuccessResult<double[]>(this.GetFanucDouble(list.ToArray(), 0, length));
			}
			catch (Exception ex)
			{
				result = new OperateResult<double[]>(ex.Message + " Source:" + list.ToArray().ToHexString(' '));
			}
			return result;
		}

		/// <summary>
		/// 写宏变量，需要指定地址及写入的数据<br />
		/// Write macro variable, need to specify the address and write data
		/// </summary>
		/// <param name="number">地址</param>
		/// <param name="values">数据值</param>
		/// <returns>是否成功</returns>
		// Token: 0x06001F58 RID: 8024 RVA: 0x00097F28 File Offset: 0x00096128
		[HslMqttApi(Description = "Write macro variable, need to specify the address and write data")]
		public OperateResult WriteSystemMacroValue(int number, double[] values)
		{
			OperateResult<byte[]> operateResult = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
			{
				this.BuildWriteSingle(22, number, number + values.Length - 1, 0, 0, values)
			}));
			bool flag = !operateResult.IsSuccess;
			OperateResult result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<string, int>(operateResult);
			}
			else
			{
				List<byte[]> list = this.ExtraContentArray(operateResult.Content.RemoveBegin(10));
				bool flag2 = base.ByteTransform.TransUInt16(list[0], 6) == 0;
				if (flag2)
				{
					result = OperateResult.CreateSuccessResult();
				}
				else
				{
					result = new OperateResult((int)base.ByteTransform.TransUInt16(list[0], 6), "Unknown Error");
				}
			}
			return result;
		}

		/// <summary>
		/// 根据刀具号写入长度形状补偿，刀具号为1-24<br />
		/// Write length shape compensation according to the tool number, the tool number is 1-24
		/// </summary>
		/// <param name="cutter">刀具号，范围为1-24</param>
		/// <param name="offset">补偿值</param>
		/// <returns>是否写入成功</returns>
		// Token: 0x06001F59 RID: 8025 RVA: 0x00097FD0 File Offset: 0x000961D0
		[HslMqttApi(Description = "Write length shape compensation according to the tool number, the tool number is 1-24")]
		public OperateResult WriteCutterLengthShapeOffset(int cutter, double offset)
		{
			return this.WriteSystemMacroValue(11000 + cutter, new double[]
			{
				offset
			});
		}

		/// <summary>
		/// 根据刀具号写入长度磨损补偿，刀具号为1-24<br />
		/// Write length wear compensation according to the tool number, the tool number is 1-24
		/// </summary>
		/// <param name="cutter">刀具号，范围为1-24</param>
		/// <param name="offset">补偿值</param>
		/// <returns>是否写入成功</returns>
		// Token: 0x06001F5A RID: 8026 RVA: 0x00097FE9 File Offset: 0x000961E9
		[HslMqttApi(Description = "Write length wear compensation according to the tool number, the tool number is 1-24")]
		public OperateResult WriteCutterLengthWearOffset(int cutter, double offset)
		{
			return this.WriteSystemMacroValue(10000 + cutter, new double[]
			{
				offset
			});
		}

		/// <summary>
		/// 根据刀具号写入半径形状补偿，刀具号为1-24<br />
		/// Write radius shape compensation according to the tool number, the tool number is 1-24
		/// </summary>
		/// <param name="cutter">刀具号，范围为1-24</param>
		/// <param name="offset">补偿值</param>
		/// <returns>是否写入成功</returns>
		// Token: 0x06001F5B RID: 8027 RVA: 0x00098002 File Offset: 0x00096202
		[HslMqttApi(Description = "Write radius shape compensation according to the tool number, the tool number is 1-24")]
		public OperateResult WriteCutterRadiusShapeOffset(int cutter, double offset)
		{
			return this.WriteSystemMacroValue(13000 + cutter, new double[]
			{
				offset
			});
		}

		/// <summary>
		/// 根据刀具号写入半径磨损补偿，刀具号为1-24<br />
		/// Write radius wear compensation according to the tool number, the tool number is 1-24
		/// </summary>
		/// <param name="cutter">刀具号，范围为1-24</param>
		/// <param name="offset">补偿值</param>
		/// <returns>是否写入成功</returns>
		// Token: 0x06001F5C RID: 8028 RVA: 0x0009801B File Offset: 0x0009621B
		[HslMqttApi(Description = "Write radius wear compensation according to the tool number, the tool number is 1-24")]
		public OperateResult WriteCutterRadiusWearOffset(int cutter, double offset)
		{
			return this.WriteSystemMacroValue(12000 + cutter, new double[]
			{
				offset
			});
		}

		/// <summary>
		/// 读取伺服负载<br />
		/// Read servo load
		/// </summary>
		/// <returns>轴负载</returns>
		// Token: 0x06001F5D RID: 8029 RVA: 0x00098034 File Offset: 0x00096234
		[HslMqttApi(Description = "Read servo load")]
		public OperateResult<double[]> ReadFanucAxisLoad()
		{
			OperateResult<byte[]> operateResult = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
			{
				this.BuildReadSingle(164, 2, 0, 0, 0, 0),
				this.BuildReadSingle(137, 0, 0, 0, 0, 0),
				this.BuildReadSingle(86, 1, 0, 0, 0, 0),
				this.BuildReadSingle(164, 2, 0, 0, 0, 0)
			}));
			bool flag = !operateResult.IsSuccess;
			OperateResult<double[]> result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<double[]>(operateResult);
			}
			else
			{
				List<byte[]> list = this.ExtraContentArray(operateResult.Content.RemoveBegin(10));
				int length = (int)base.ByteTransform.TransUInt16(list[0], 14);
				result = OperateResult.CreateSuccessResult<double[]>(this.GetFanucDouble(list[2], 14, length));
			}
			return result;
		}

		/// <summary>
		/// 读取机床的坐标，包括机械坐标，绝对坐标，相对坐标<br />
		/// Read the coordinates of the machine tool, including mechanical coordinates, absolute coordinates, and relative coordinates
		/// </summary>
		/// <returns>数控机床的坐标信息，包括机械坐标，绝对坐标，相对坐标</returns>
		// Token: 0x06001F5E RID: 8030 RVA: 0x000980FC File Offset: 0x000962FC
		[HslMqttApi(Description = "Read the coordinates of the machine tool, including mechanical coordinates, absolute coordinates, and relative coordinates")]
		public OperateResult<SysAllCoors> ReadSysAllCoors()
		{
			OperateResult<byte[]> operateResult = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
			{
				this.BuildReadSingle(164, 0, 0, 0, 0, 0),
				this.BuildReadSingle(137, -1, 0, 0, 0, 0),
				this.BuildReadSingle(136, 1, 0, 0, 0, 0),
				this.BuildReadSingle(136, 2, 0, 0, 0, 0),
				this.BuildReadSingle(163, 0, -1, 0, 0, 0),
				this.BuildReadSingle(38, 0, -1, 0, 0, 0),
				this.BuildReadSingle(38, 1, -1, 0, 0, 0),
				this.BuildReadSingle(38, 2, -1, 0, 0, 0),
				this.BuildReadSingle(38, 3, -1, 0, 0, 0),
				this.BuildReadSingle(164, 0, 0, 0, 0, 0)
			}));
			bool flag = !operateResult.IsSuccess;
			OperateResult<SysAllCoors> result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<SysAllCoors>(operateResult);
			}
			else
			{
				List<byte[]> list = this.ExtraContentArray(operateResult.Content.RemoveBegin(10));
				int length = (int)base.ByteTransform.TransUInt16(list[0], 14);
				result = OperateResult.CreateSuccessResult<SysAllCoors>(new SysAllCoors
				{
					Absolute = this.GetFanucDouble(list[5], 14, length),
					Machine = this.GetFanucDouble(list[6], 14, length),
					Relative = this.GetFanucDouble(list[7], 14, length)
				});
			}
			return result;
		}

		/// <summary>
		/// 读取报警信息<br />
		/// Read alarm information
		/// </summary>
		/// <returns>机床的当前的所有的报警信息</returns>
		// Token: 0x06001F5F RID: 8031 RVA: 0x0009826C File Offset: 0x0009646C
		[HslMqttApi(Description = "Read alarm information")]
		public OperateResult<SysAlarm[]> ReadSystemAlarm()
		{
			OperateResult<byte[]> operateResult = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
			{
				this.BuildReadSingle(35, -1, 10, 2, 64, 0)
			}));
			bool flag = !operateResult.IsSuccess;
			OperateResult<SysAlarm[]> result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<SysAlarm[]>(operateResult);
			}
			else
			{
				List<byte[]> list = this.ExtraContentArray(operateResult.Content.RemoveBegin(10));
				bool flag2 = base.ByteTransform.TransUInt16(list[0], 12) > 0;
				if (flag2)
				{
					int num = (int)(base.ByteTransform.TransUInt16(list[0], 12) / 80);
					SysAlarm[] array = new SysAlarm[num];
					for (int i = 0; i < array.Length; i++)
					{
						array[i] = new SysAlarm();
						array[i].AlarmId = base.ByteTransform.TransInt32(list[0], 14 + 80 * i);
						array[i].Type = base.ByteTransform.TransInt16(list[0], 20 + 80 * i);
						array[i].Axis = base.ByteTransform.TransInt16(list[0], 24 + 80 * i);
						ushort count = base.ByteTransform.TransUInt16(list[0], 28 + 80 * i);
						array[i].Message = Encoding.Default.GetString(list[0], 30 + 80 * i, (int)count);
					}
					result = OperateResult.CreateSuccessResult<SysAlarm[]>(array);
				}
				else
				{
					result = OperateResult.CreateSuccessResult<SysAlarm[]>(new SysAlarm[0]);
				}
			}
			return result;
		}

		/// <summary>
		/// 读取fanuc机床的时间，0是开机时间，1是运行时间，2是切割时间，3是循环时间，4是空闲时间，返回秒为单位的信息<br />
		/// Read the time of the fanuc machine tool, 0 is the boot time, 1 is the running time, 2 is the cutting time, 
		/// 3 is the cycle time, 4 is the idle time, and returns the information in seconds.
		/// </summary>
		/// <param name="timeType">读取的时间类型</param>
		/// <returns>秒为单位的结果</returns>
		// Token: 0x06001F60 RID: 8032 RVA: 0x00098404 File Offset: 0x00096604
		[HslMqttApi(Description = "Read the time of the fanuc machine tool, 0 is the boot time, 1 is the running time, 2 is the cutting time, 3 is the cycle time, 4 is the idle time, and returns the information in seconds.")]
		public OperateResult<long> ReadTimeData(int timeType)
		{
			OperateResult<byte[]> operateResult = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
			{
				this.BuildReadSingle(288, timeType, 0, 0, 0, 0)
			}));
			bool flag = !operateResult.IsSuccess;
			OperateResult<long> result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<long>(operateResult);
			}
			else
			{
				List<byte[]> list = this.ExtraContentArray(operateResult.Content.RemoveBegin(10));
				int num = base.ByteTransform.TransInt32(list[0], 18);
				long num2 = (long)base.ByteTransform.TransInt32(list[0], 14);
				bool flag2 = num < 0 || num > 60000;
				if (flag2)
				{
					num = BitConverter.ToInt32(list[0], 18);
					num2 = (long)BitConverter.ToInt32(list[0], 14);
				}
				long num3 = (long)(num / 1000);
				result = OperateResult.CreateSuccessResult<long>(num2 * 60L + num3);
			}
			return result;
		}

		/// <summary>
		/// 读取报警状态信息<br />
		/// Read alarm status information
		/// </summary>
		/// <returns>报警状态数据</returns>
		// Token: 0x06001F61 RID: 8033 RVA: 0x000984E8 File Offset: 0x000966E8
		[HslMqttApi(Description = "Read alarm status information")]
		public OperateResult<int> ReadAlarmStatus()
		{
			OperateResult<byte[]> operateResult = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
			{
				this.BuildReadSingle(26, 0, 0, 0, 0, 0)
			}));
			bool flag = !operateResult.IsSuccess;
			OperateResult<int> result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<int>(operateResult);
			}
			else
			{
				List<byte[]> list = this.ExtraContentArray(operateResult.Content.RemoveBegin(10));
				result = OperateResult.CreateSuccessResult<int>((int)base.ByteTransform.TransUInt16(list[0], 16));
			}
			return result;
		}

		/// <summary>
		/// 读取系统的基本信息状态，工作模式，运行状态，是否急停等等操作<br />
		/// Read the basic information status of the system, working mode, running status, emergency stop, etc.
		/// </summary>
		/// <returns>结果信息数据</returns>
		// Token: 0x06001F62 RID: 8034 RVA: 0x00098560 File Offset: 0x00096760
		[HslMqttApi(Description = "Read the basic information status of the system, working mode, running status, emergency stop, etc.")]
		public OperateResult<SysStatusInfo> ReadSysStatusInfo()
		{
			OperateResult<byte[]> operateResult = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
			{
				this.BuildReadSingle(25, 0, 0, 0, 0, 0),
				this.BuildReadSingle(225, 0, 0, 0, 0, 0),
				this.BuildReadSingle(152, 0, 0, 0, 0, 0)
			}));
			bool flag = !operateResult.IsSuccess;
			OperateResult<SysStatusInfo> result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<SysStatusInfo>(operateResult);
			}
			else
			{
				List<byte[]> list = this.ExtraContentArray(operateResult.Content.RemoveBegin(10));
				result = OperateResult.CreateSuccessResult<SysStatusInfo>(new SysStatusInfo
				{
					Dummy = base.ByteTransform.TransInt16(list[1], 14),
					TMMode = ((list[2].Length >= 16) ? base.ByteTransform.TransInt16(list[2], 14) : 0),
					WorkMode = (CNCWorkMode)base.ByteTransform.TransInt16(list[0], 14),
					RunStatus = (CNCRunStatus)base.ByteTransform.TransInt16(list[0], 16),
					Motion = base.ByteTransform.TransInt16(list[0], 18),
					MSTB = base.ByteTransform.TransInt16(list[0], 20),
					Emergency = base.ByteTransform.TransInt16(list[0], 22),
					Alarm = base.ByteTransform.TransInt16(list[0], 24),
					Edit = base.ByteTransform.TransInt16(list[0], 26)
				});
			}
			return result;
		}

		/// <summary>
		/// 读取设备的程序列表<br />
		/// Read the program list of the device
		/// </summary>
		/// <returns>读取结果信息</returns>
		// Token: 0x06001F63 RID: 8035 RVA: 0x000986FC File Offset: 0x000968FC
		[HslMqttApi(Description = "Read the program list of the device")]
		public OperateResult<int[]> ReadProgramList()
		{
			OperateResult<byte[]> operateResult = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
			{
				this.BuildReadSingle(6, 1, 19, 0, 0, 0)
			}));
			OperateResult<byte[]> operateResult2 = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
			{
				this.BuildReadSingle(6, 6667, 19, 0, 0, 0)
			}));
			bool flag = !operateResult.IsSuccess;
			OperateResult<int[]> result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<int[]>(operateResult);
			}
			else
			{
				bool flag2 = !operateResult2.IsSuccess;
				if (flag2)
				{
					result = OperateResult.CreateFailedResult<int[]>(operateResult);
				}
				else
				{
					List<byte[]> list = this.ExtraContentArray(operateResult.Content.RemoveBegin(10));
					int num = (list[0].Length - 14) / 72;
					int[] array = new int[num];
					for (int i = 0; i < num; i++)
					{
						array[i] = base.ByteTransform.TransInt32(list[0], 14 + 72 * i);
					}
					result = OperateResult.CreateSuccessResult<int[]>(array);
				}
			}
			return result;
		}

		/// <summary>
		/// 读取当前的刀具补偿信息<br />
		/// Read current tool compensation information
		/// </summary>
		/// <param name="cutterNumber">刀具数量</param>
		/// <returns>结果内容</returns>
		// Token: 0x06001F64 RID: 8036 RVA: 0x000987FC File Offset: 0x000969FC
		[HslMqttApi(Description = "Read current tool compensation information")]
		public OperateResult<CutterInfo[]> ReadCutterInfos(int cutterNumber = 24)
		{
			OperateResult<byte[]> operateResult = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
			{
				this.BuildReadSingle(8, 1, cutterNumber, 0, 0, 0)
			}));
			bool flag = !operateResult.IsSuccess;
			OperateResult<CutterInfo[]> result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<CutterInfo[]>(operateResult);
			}
			else
			{
				OperateResult<byte[]> operateResult2 = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
				{
					this.BuildReadSingle(8, 1, cutterNumber, 1, 0, 0)
				}));
				bool flag2 = !operateResult2.IsSuccess;
				if (flag2)
				{
					result = OperateResult.CreateFailedResult<CutterInfo[]>(operateResult2);
				}
				else
				{
					OperateResult<byte[]> operateResult3 = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
					{
						this.BuildReadSingle(8, 1, cutterNumber, 2, 0, 0)
					}));
					bool flag3 = !operateResult3.IsSuccess;
					if (flag3)
					{
						result = OperateResult.CreateFailedResult<CutterInfo[]>(operateResult3);
					}
					else
					{
						OperateResult<byte[]> operateResult4 = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
						{
							this.BuildReadSingle(8, 1, cutterNumber, 3, 0, 0)
						}));
						bool flag4 = !operateResult4.IsSuccess;
						if (flag4)
						{
							result = OperateResult.CreateFailedResult<CutterInfo[]>(operateResult4);
						}
						else
						{
							List<byte[]> list = this.ExtraContentArray(operateResult.Content.RemoveBegin(10));
							List<byte[]> list2 = this.ExtraContentArray(operateResult2.Content.RemoveBegin(10));
							List<byte[]> list3 = this.ExtraContentArray(operateResult3.Content.RemoveBegin(10));
							List<byte[]> list4 = this.ExtraContentArray(operateResult4.Content.RemoveBegin(10));
							CutterInfo[] array = new CutterInfo[cutterNumber];
							for (int i = 0; i < array.Length; i++)
							{
								array[i] = new CutterInfo();
								array[i].LengthSharpOffset = this.GetFanucDouble(list[0], 14 + 8 * i);
								array[i].LengthWearOffset = this.GetFanucDouble(list2[0], 14 + 8 * i);
								array[i].RadiusSharpOffset = this.GetFanucDouble(list3[0], 14 + 8 * i);
								array[i].RadiusWearOffset = this.GetFanucDouble(list4[0], 14 + 8 * i);
							}
							result = OperateResult.CreateSuccessResult<CutterInfo[]>(array);
						}
					}
				}
			}
			return result;
		}

		/// <summary>
		/// 读取工件尺寸<br />
		/// Read workpiece size
		/// </summary>
		/// <returns>结果数据信息</returns>
		// Token: 0x06001F65 RID: 8037 RVA: 0x00098A16 File Offset: 0x00096C16
		[HslMqttApi(Description = "Read workpiece size")]
		public OperateResult<double[]> ReadDeviceWorkPiecesSize()
		{
			return this.ReadSystemMacroValue(601, 20);
		}

		/// <summary>
		/// 读取指定的程序内容，目前还没有测试通
		/// </summary>
		/// <param name="program">程序号</param>
		/// <returns>程序内容</returns>
		// Token: 0x06001F66 RID: 8038 RVA: 0x00098A28 File Offset: 0x00096C28
		[Obsolete]
		private OperateResult<string> ReadProgram(int program)
		{
			OperateResult<byte[]> operateResult = base.ReadFromCoreServer(this.BuildReadProgram(program));
			bool flag = !operateResult.IsSuccess;
			OperateResult<string> result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<string>(operateResult);
			}
			else
			{
				Console.WriteLine("等待第二次数据接收。");
				Thread.Sleep(100);
				OperateResult<byte[]> operateResult2 = base.ReadFromCoreServer("a0 a0 a0 a0 00 01 18 04 00 08 00 00 00 00 00 00 00 00".ToHexBytes());
				bool flag2 = !operateResult2.IsSuccess;
				if (flag2)
				{
					result = OperateResult.CreateFailedResult<string>(operateResult2);
				}
				else
				{
					string @string = Encoding.ASCII.GetString(operateResult2.Content, 10, operateResult2.Content.Length - 10);
					result = OperateResult.CreateSuccessResult<string>(@string);
				}
			}
			return result;
		}

		/// <summary>
		/// 读取当前程序的前台路径<br />
		/// Read the foreground path of the current program
		/// </summary>
		/// <returns>程序的路径信息</returns>
		// Token: 0x06001F67 RID: 8039 RVA: 0x00098AC4 File Offset: 0x00096CC4
		[HslMqttApi(Description = "Read the foreground path of the current program")]
		public OperateResult<string> ReadCurrentForegroundDir()
		{
			OperateResult<byte[]> operateResult = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
			{
				this.BuildReadSingle(176, 1, 0, 0, 0, 0)
			}));
			bool flag = !operateResult.IsSuccess;
			OperateResult<string> result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<string>(operateResult);
			}
			else
			{
				List<byte[]> list = this.ExtraContentArray(operateResult.Content.RemoveBegin(10));
				int num = 0;
				for (int i = 14; i < list[0].Length; i++)
				{
					bool flag2 = list[0][i] == 0;
					if (flag2)
					{
						num = i;
						break;
					}
				}
				bool flag3 = num == 0;
				if (flag3)
				{
					num = list[0].Length;
				}
				result = OperateResult.CreateSuccessResult<string>(Encoding.ASCII.GetString(list[0], 14, num - 14));
			}
			return result;
		}

		/// <summary>
		/// 设置指定路径为当前路径<br />
		/// Set the specified path as the current path
		/// </summary>
		/// <param name="programName">程序名</param>
		/// <returns>结果信息</returns>
		// Token: 0x06001F68 RID: 8040 RVA: 0x00098B98 File Offset: 0x00096D98
		[HslMqttApi(Description = "Set the specified path as the current path")]
		public OperateResult SetDeviceProgsCurr(string programName)
		{
			OperateResult<string> operateResult = this.ReadCurrentForegroundDir();
			bool flag = !operateResult.IsSuccess;
			OperateResult result;
			if (flag)
			{
				result = operateResult;
			}
			else
			{
				byte[] array = new byte[256];
				Encoding.ASCII.GetBytes(operateResult.Content + programName).CopyTo(array, 0);
				OperateResult<byte[]> operateResult2 = base.ReadFromCoreServer(this.BuildReadArray(new byte[][]
				{
					this.BuildWriteSingle(186, 0, 0, 0, 0, array)
				}));
				bool flag2 = !operateResult2.IsSuccess;
				if (flag2)
				{
					result = OperateResult.CreateFailedResult<string>(operateResult2);
				}
				else
				{
					List<byte[]> list = this.ExtraContentArray(operateResult2.Content.RemoveBegin(10));
					int num = (int)list[0][10] * 256 + (int)list[0][11];
					bool flag3 = num == 0;
					if (flag3)
					{
						result = OperateResult.CreateSuccessResult();
					}
					else
					{
						result = new OperateResult(num, StringResources.Language.UnknownError);
					}
				}
			}
			return result;
		}

		/// <summary>
		/// 读取机床的当前时间信息<br />
		/// Read the current time information of the machine tool
		/// </summary>
		/// <returns>时间信息</returns>
		// Token: 0x06001F69 RID: 8041 RVA: 0x00098C88 File Offset: 0x00096E88
		[HslMqttApi(Description = "Read the current time information of the machine tool")]
		public OperateResult<DateTime> ReadCurrentDateTime()
		{
			OperateResult<double> operateResult = this.ReadSystemMacroValue(3011);
			bool flag = !operateResult.IsSuccess;
			OperateResult<DateTime> result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<DateTime>(operateResult);
			}
			else
			{
				OperateResult<double> operateResult2 = this.ReadSystemMacroValue(3012);
				bool flag2 = !operateResult2.IsSuccess;
				if (flag2)
				{
					result = OperateResult.CreateFailedResult<DateTime>(operateResult2);
				}
				else
				{
					string text = Convert.ToInt32(operateResult.Content).ToString();
					string text2 = Convert.ToInt32(operateResult2.Content).ToString().PadLeft(6, '0');
					result = OperateResult.CreateSuccessResult<DateTime>(new DateTime(int.Parse(text.Substring(0, 4)), int.Parse(text.Substring(4, 2)), int.Parse(text.Substring(6)), int.Parse(text2.Substring(0, 2)), int.Parse(text2.Substring(2, 2)), int.Parse(text2.Substring(4))));
				}
			}
			return result;
		}

		/// <summary>
		/// 读取当前的已加工的零件数量<br />
		/// Read the current number of processed parts
		/// </summary>
		/// <returns>已经加工的零件数量</returns>
		// Token: 0x06001F6A RID: 8042 RVA: 0x00098D74 File Offset: 0x00096F74
		[HslMqttApi(Description = "Read the current number of processed parts")]
		public OperateResult<int> ReadCurrentProduceCount()
		{
			OperateResult<double> operateResult = this.ReadSystemMacroValue(3901);
			bool flag = !operateResult.IsSuccess;
			OperateResult<int> result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<int>(operateResult);
			}
			else
			{
				result = OperateResult.CreateSuccessResult<int>(Convert.ToInt32(operateResult.Content));
			}
			return result;
		}

		/// <summary>
		/// 读取期望的加工的零件数量<br />
		/// Read the expected number of processed parts
		/// </summary>
		/// <returns>期望的加工的零件数量</returns>
		// Token: 0x06001F6B RID: 8043 RVA: 0x00098DB8 File Offset: 0x00096FB8
		[HslMqttApi(Description = "Read the expected number of processed parts")]
		public OperateResult<int> ReadExpectProduceCount()
		{
			OperateResult<double> operateResult = this.ReadSystemMacroValue(3902);
			bool flag = !operateResult.IsSuccess;
			OperateResult<int> result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<int>(operateResult);
			}
			else
			{
				result = OperateResult.CreateSuccessResult<int>(Convert.ToInt32(operateResult.Content));
			}
			return result;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.ReadSpindleSpeedAndFeedRate" />
		// Token: 0x06001F6C RID: 8044 RVA: 0x00098DFC File Offset: 0x00096FFC
		[DebuggerStepThrough]
		public Task<OperateResult<double, double>> ReadSpindleSpeedAndFeedRateAsync()
		{
			FanucSeries0i.<ReadSpindleSpeedAndFeedRateAsync>d__33 <ReadSpindleSpeedAndFeedRateAsync>d__ = new FanucSeries0i.<ReadSpindleSpeedAndFeedRateAsync>d__33();
			<ReadSpindleSpeedAndFeedRateAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<double, double>>.Create();
			<ReadSpindleSpeedAndFeedRateAsync>d__.<>4__this = this;
			<ReadSpindleSpeedAndFeedRateAsync>d__.<>1__state = -1;
			<ReadSpindleSpeedAndFeedRateAsync>d__.<>t__builder.Start<FanucSeries0i.<ReadSpindleSpeedAndFeedRateAsync>d__33>(ref <ReadSpindleSpeedAndFeedRateAsync>d__);
			return <ReadSpindleSpeedAndFeedRateAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.ReadSystemProgramCurrent" />
		// Token: 0x06001F6D RID: 8045 RVA: 0x00098E40 File Offset: 0x00097040
		[DebuggerStepThrough]
		public Task<OperateResult<string, int>> ReadSystemProgramCurrentAsync()
		{
			FanucSeries0i.<ReadSystemProgramCurrentAsync>d__34 <ReadSystemProgramCurrentAsync>d__ = new FanucSeries0i.<ReadSystemProgramCurrentAsync>d__34();
			<ReadSystemProgramCurrentAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<string, int>>.Create();
			<ReadSystemProgramCurrentAsync>d__.<>4__this = this;
			<ReadSystemProgramCurrentAsync>d__.<>1__state = -1;
			<ReadSystemProgramCurrentAsync>d__.<>t__builder.Start<FanucSeries0i.<ReadSystemProgramCurrentAsync>d__34>(ref <ReadSystemProgramCurrentAsync>d__);
			return <ReadSystemProgramCurrentAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.ReadSystemMacroValue(System.Int32)" />
		// Token: 0x06001F6E RID: 8046 RVA: 0x00098E84 File Offset: 0x00097084
		[DebuggerStepThrough]
		public Task<OperateResult<double>> ReadSystemMacroValueAsync(int number)
		{
			FanucSeries0i.<ReadSystemMacroValueAsync>d__35 <ReadSystemMacroValueAsync>d__ = new FanucSeries0i.<ReadSystemMacroValueAsync>d__35();
			<ReadSystemMacroValueAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<double>>.Create();
			<ReadSystemMacroValueAsync>d__.<>4__this = this;
			<ReadSystemMacroValueAsync>d__.number = number;
			<ReadSystemMacroValueAsync>d__.<>1__state = -1;
			<ReadSystemMacroValueAsync>d__.<>t__builder.Start<FanucSeries0i.<ReadSystemMacroValueAsync>d__35>(ref <ReadSystemMacroValueAsync>d__);
			return <ReadSystemMacroValueAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.ReadSystemMacroValue(System.Int32,System.Int32)" />
		// Token: 0x06001F6F RID: 8047 RVA: 0x00098ED0 File Offset: 0x000970D0
		[DebuggerStepThrough]
		public Task<OperateResult<double[]>> ReadSystemMacroValueAsync(int number, int length)
		{
			FanucSeries0i.<ReadSystemMacroValueAsync>d__36 <ReadSystemMacroValueAsync>d__ = new FanucSeries0i.<ReadSystemMacroValueAsync>d__36();
			<ReadSystemMacroValueAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<double[]>>.Create();
			<ReadSystemMacroValueAsync>d__.<>4__this = this;
			<ReadSystemMacroValueAsync>d__.number = number;
			<ReadSystemMacroValueAsync>d__.length = length;
			<ReadSystemMacroValueAsync>d__.<>1__state = -1;
			<ReadSystemMacroValueAsync>d__.<>t__builder.Start<FanucSeries0i.<ReadSystemMacroValueAsync>d__36>(ref <ReadSystemMacroValueAsync>d__);
			return <ReadSystemMacroValueAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.WriteSystemMacroValue(System.Int32,System.Double[])" />
		// Token: 0x06001F70 RID: 8048 RVA: 0x00098F24 File Offset: 0x00097124
		[DebuggerStepThrough]
		public Task<OperateResult> WriteSystemMacroValueAsync(int number, double[] values)
		{
			FanucSeries0i.<WriteSystemMacroValueAsync>d__37 <WriteSystemMacroValueAsync>d__ = new FanucSeries0i.<WriteSystemMacroValueAsync>d__37();
			<WriteSystemMacroValueAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult>.Create();
			<WriteSystemMacroValueAsync>d__.<>4__this = this;
			<WriteSystemMacroValueAsync>d__.number = number;
			<WriteSystemMacroValueAsync>d__.values = values;
			<WriteSystemMacroValueAsync>d__.<>1__state = -1;
			<WriteSystemMacroValueAsync>d__.<>t__builder.Start<FanucSeries0i.<WriteSystemMacroValueAsync>d__37>(ref <WriteSystemMacroValueAsync>d__);
			return <WriteSystemMacroValueAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.WriteCutterLengthShapeOffset(System.Int32,System.Double)" />
		// Token: 0x06001F71 RID: 8049 RVA: 0x00098F78 File Offset: 0x00097178
		[DebuggerStepThrough]
		public Task<OperateResult> WriteCutterLengthSharpOffsetAsync(int cutter, double offset)
		{
			FanucSeries0i.<WriteCutterLengthSharpOffsetAsync>d__38 <WriteCutterLengthSharpOffsetAsync>d__ = new FanucSeries0i.<WriteCutterLengthSharpOffsetAsync>d__38();
			<WriteCutterLengthSharpOffsetAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult>.Create();
			<WriteCutterLengthSharpOffsetAsync>d__.<>4__this = this;
			<WriteCutterLengthSharpOffsetAsync>d__.cutter = cutter;
			<WriteCutterLengthSharpOffsetAsync>d__.offset = offset;
			<WriteCutterLengthSharpOffsetAsync>d__.<>1__state = -1;
			<WriteCutterLengthSharpOffsetAsync>d__.<>t__builder.Start<FanucSeries0i.<WriteCutterLengthSharpOffsetAsync>d__38>(ref <WriteCutterLengthSharpOffsetAsync>d__);
			return <WriteCutterLengthSharpOffsetAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.WriteCutterLengthWearOffset(System.Int32,System.Double)" />
		// Token: 0x06001F72 RID: 8050 RVA: 0x00098FCC File Offset: 0x000971CC
		[DebuggerStepThrough]
		public Task<OperateResult> WriteCutterLengthWearOffsetAsync(int cutter, double offset)
		{
			FanucSeries0i.<WriteCutterLengthWearOffsetAsync>d__39 <WriteCutterLengthWearOffsetAsync>d__ = new FanucSeries0i.<WriteCutterLengthWearOffsetAsync>d__39();
			<WriteCutterLengthWearOffsetAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult>.Create();
			<WriteCutterLengthWearOffsetAsync>d__.<>4__this = this;
			<WriteCutterLengthWearOffsetAsync>d__.cutter = cutter;
			<WriteCutterLengthWearOffsetAsync>d__.offset = offset;
			<WriteCutterLengthWearOffsetAsync>d__.<>1__state = -1;
			<WriteCutterLengthWearOffsetAsync>d__.<>t__builder.Start<FanucSeries0i.<WriteCutterLengthWearOffsetAsync>d__39>(ref <WriteCutterLengthWearOffsetAsync>d__);
			return <WriteCutterLengthWearOffsetAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.WriteCutterRadiusShapeOffset(System.Int32,System.Double)" />
		// Token: 0x06001F73 RID: 8051 RVA: 0x00099020 File Offset: 0x00097220
		[DebuggerStepThrough]
		public Task<OperateResult> WriteCutterRadiusSharpOffsetAsync(int cutter, double offset)
		{
			FanucSeries0i.<WriteCutterRadiusSharpOffsetAsync>d__40 <WriteCutterRadiusSharpOffsetAsync>d__ = new FanucSeries0i.<WriteCutterRadiusSharpOffsetAsync>d__40();
			<WriteCutterRadiusSharpOffsetAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult>.Create();
			<WriteCutterRadiusSharpOffsetAsync>d__.<>4__this = this;
			<WriteCutterRadiusSharpOffsetAsync>d__.cutter = cutter;
			<WriteCutterRadiusSharpOffsetAsync>d__.offset = offset;
			<WriteCutterRadiusSharpOffsetAsync>d__.<>1__state = -1;
			<WriteCutterRadiusSharpOffsetAsync>d__.<>t__builder.Start<FanucSeries0i.<WriteCutterRadiusSharpOffsetAsync>d__40>(ref <WriteCutterRadiusSharpOffsetAsync>d__);
			return <WriteCutterRadiusSharpOffsetAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.WriteCutterRadiusWearOffset(System.Int32,System.Double)" />
		// Token: 0x06001F74 RID: 8052 RVA: 0x00099074 File Offset: 0x00097274
		[DebuggerStepThrough]
		public Task<OperateResult> WriteCutterRadiusWearOffsetAsync(int cutter, double offset)
		{
			FanucSeries0i.<WriteCutterRadiusWearOffsetAsync>d__41 <WriteCutterRadiusWearOffsetAsync>d__ = new FanucSeries0i.<WriteCutterRadiusWearOffsetAsync>d__41();
			<WriteCutterRadiusWearOffsetAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult>.Create();
			<WriteCutterRadiusWearOffsetAsync>d__.<>4__this = this;
			<WriteCutterRadiusWearOffsetAsync>d__.cutter = cutter;
			<WriteCutterRadiusWearOffsetAsync>d__.offset = offset;
			<WriteCutterRadiusWearOffsetAsync>d__.<>1__state = -1;
			<WriteCutterRadiusWearOffsetAsync>d__.<>t__builder.Start<FanucSeries0i.<WriteCutterRadiusWearOffsetAsync>d__41>(ref <WriteCutterRadiusWearOffsetAsync>d__);
			return <WriteCutterRadiusWearOffsetAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.ReadFanucAxisLoad" />
		// Token: 0x06001F75 RID: 8053 RVA: 0x000990C8 File Offset: 0x000972C8
		[DebuggerStepThrough]
		public Task<OperateResult<double[]>> ReadFanucAxisLoadAsync()
		{
			FanucSeries0i.<ReadFanucAxisLoadAsync>d__42 <ReadFanucAxisLoadAsync>d__ = new FanucSeries0i.<ReadFanucAxisLoadAsync>d__42();
			<ReadFanucAxisLoadAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<double[]>>.Create();
			<ReadFanucAxisLoadAsync>d__.<>4__this = this;
			<ReadFanucAxisLoadAsync>d__.<>1__state = -1;
			<ReadFanucAxisLoadAsync>d__.<>t__builder.Start<FanucSeries0i.<ReadFanucAxisLoadAsync>d__42>(ref <ReadFanucAxisLoadAsync>d__);
			return <ReadFanucAxisLoadAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.ReadSysAllCoors" />
		// Token: 0x06001F76 RID: 8054 RVA: 0x0009910C File Offset: 0x0009730C
		[DebuggerStepThrough]
		public Task<OperateResult<SysAllCoors>> ReadSysAllCoorsAsync()
		{
			FanucSeries0i.<ReadSysAllCoorsAsync>d__43 <ReadSysAllCoorsAsync>d__ = new FanucSeries0i.<ReadSysAllCoorsAsync>d__43();
			<ReadSysAllCoorsAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<SysAllCoors>>.Create();
			<ReadSysAllCoorsAsync>d__.<>4__this = this;
			<ReadSysAllCoorsAsync>d__.<>1__state = -1;
			<ReadSysAllCoorsAsync>d__.<>t__builder.Start<FanucSeries0i.<ReadSysAllCoorsAsync>d__43>(ref <ReadSysAllCoorsAsync>d__);
			return <ReadSysAllCoorsAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.ReadSystemAlarm" />
		// Token: 0x06001F77 RID: 8055 RVA: 0x00099150 File Offset: 0x00097350
		[DebuggerStepThrough]
		public Task<OperateResult<SysAlarm[]>> ReadSystemAlarmAsync()
		{
			FanucSeries0i.<ReadSystemAlarmAsync>d__44 <ReadSystemAlarmAsync>d__ = new FanucSeries0i.<ReadSystemAlarmAsync>d__44();
			<ReadSystemAlarmAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<SysAlarm[]>>.Create();
			<ReadSystemAlarmAsync>d__.<>4__this = this;
			<ReadSystemAlarmAsync>d__.<>1__state = -1;
			<ReadSystemAlarmAsync>d__.<>t__builder.Start<FanucSeries0i.<ReadSystemAlarmAsync>d__44>(ref <ReadSystemAlarmAsync>d__);
			return <ReadSystemAlarmAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.ReadTimeData(System.Int32)" />
		// Token: 0x06001F78 RID: 8056 RVA: 0x00099194 File Offset: 0x00097394
		[DebuggerStepThrough]
		public Task<OperateResult<long>> ReadTimeDataAsync(int timeType)
		{
			FanucSeries0i.<ReadTimeDataAsync>d__45 <ReadTimeDataAsync>d__ = new FanucSeries0i.<ReadTimeDataAsync>d__45();
			<ReadTimeDataAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<long>>.Create();
			<ReadTimeDataAsync>d__.<>4__this = this;
			<ReadTimeDataAsync>d__.timeType = timeType;
			<ReadTimeDataAsync>d__.<>1__state = -1;
			<ReadTimeDataAsync>d__.<>t__builder.Start<FanucSeries0i.<ReadTimeDataAsync>d__45>(ref <ReadTimeDataAsync>d__);
			return <ReadTimeDataAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.ReadAlarmStatus" />
		// Token: 0x06001F79 RID: 8057 RVA: 0x000991E0 File Offset: 0x000973E0
		[DebuggerStepThrough]
		public Task<OperateResult<int>> ReadAlarmStatusAsync()
		{
			FanucSeries0i.<ReadAlarmStatusAsync>d__46 <ReadAlarmStatusAsync>d__ = new FanucSeries0i.<ReadAlarmStatusAsync>d__46();
			<ReadAlarmStatusAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<int>>.Create();
			<ReadAlarmStatusAsync>d__.<>4__this = this;
			<ReadAlarmStatusAsync>d__.<>1__state = -1;
			<ReadAlarmStatusAsync>d__.<>t__builder.Start<FanucSeries0i.<ReadAlarmStatusAsync>d__46>(ref <ReadAlarmStatusAsync>d__);
			return <ReadAlarmStatusAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.ReadSysStatusInfo" />
		// Token: 0x06001F7A RID: 8058 RVA: 0x00099224 File Offset: 0x00097424
		[DebuggerStepThrough]
		public Task<OperateResult<SysStatusInfo>> ReadSysStatusInfoAsync()
		{
			FanucSeries0i.<ReadSysStatusInfoAsync>d__47 <ReadSysStatusInfoAsync>d__ = new FanucSeries0i.<ReadSysStatusInfoAsync>d__47();
			<ReadSysStatusInfoAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<SysStatusInfo>>.Create();
			<ReadSysStatusInfoAsync>d__.<>4__this = this;
			<ReadSysStatusInfoAsync>d__.<>1__state = -1;
			<ReadSysStatusInfoAsync>d__.<>t__builder.Start<FanucSeries0i.<ReadSysStatusInfoAsync>d__47>(ref <ReadSysStatusInfoAsync>d__);
			return <ReadSysStatusInfoAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.ReadProgramList" />
		// Token: 0x06001F7B RID: 8059 RVA: 0x00099268 File Offset: 0x00097468
		[DebuggerStepThrough]
		public Task<OperateResult<int[]>> ReadProgramListAsync()
		{
			FanucSeries0i.<ReadProgramListAsync>d__48 <ReadProgramListAsync>d__ = new FanucSeries0i.<ReadProgramListAsync>d__48();
			<ReadProgramListAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<int[]>>.Create();
			<ReadProgramListAsync>d__.<>4__this = this;
			<ReadProgramListAsync>d__.<>1__state = -1;
			<ReadProgramListAsync>d__.<>t__builder.Start<FanucSeries0i.<ReadProgramListAsync>d__48>(ref <ReadProgramListAsync>d__);
			return <ReadProgramListAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.ReadCutterInfos(System.Int32)" />
		// Token: 0x06001F7C RID: 8060 RVA: 0x000992AC File Offset: 0x000974AC
		[DebuggerStepThrough]
		public Task<OperateResult<CutterInfo[]>> ReadCutterInfosAsync(int cutterNumber = 24)
		{
			FanucSeries0i.<ReadCutterInfosAsync>d__49 <ReadCutterInfosAsync>d__ = new FanucSeries0i.<ReadCutterInfosAsync>d__49();
			<ReadCutterInfosAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<CutterInfo[]>>.Create();
			<ReadCutterInfosAsync>d__.<>4__this = this;
			<ReadCutterInfosAsync>d__.cutterNumber = cutterNumber;
			<ReadCutterInfosAsync>d__.<>1__state = -1;
			<ReadCutterInfosAsync>d__.<>t__builder.Start<FanucSeries0i.<ReadCutterInfosAsync>d__49>(ref <ReadCutterInfosAsync>d__);
			return <ReadCutterInfosAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.ReadDeviceWorkPiecesSize" />
		// Token: 0x06001F7D RID: 8061 RVA: 0x000992F8 File Offset: 0x000974F8
		[DebuggerStepThrough]
		public Task<OperateResult<double[]>> ReadDeviceWorkPiecesSizeAsync()
		{
			FanucSeries0i.<ReadDeviceWorkPiecesSizeAsync>d__50 <ReadDeviceWorkPiecesSizeAsync>d__ = new FanucSeries0i.<ReadDeviceWorkPiecesSizeAsync>d__50();
			<ReadDeviceWorkPiecesSizeAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<double[]>>.Create();
			<ReadDeviceWorkPiecesSizeAsync>d__.<>4__this = this;
			<ReadDeviceWorkPiecesSizeAsync>d__.<>1__state = -1;
			<ReadDeviceWorkPiecesSizeAsync>d__.<>t__builder.Start<FanucSeries0i.<ReadDeviceWorkPiecesSizeAsync>d__50>(ref <ReadDeviceWorkPiecesSizeAsync>d__);
			return <ReadDeviceWorkPiecesSizeAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.ReadCurrentForegroundDir" />
		// Token: 0x06001F7E RID: 8062 RVA: 0x0009933C File Offset: 0x0009753C
		[DebuggerStepThrough]
		public Task<OperateResult<string>> ReadCurrentForegroundDirAsync()
		{
			FanucSeries0i.<ReadCurrentForegroundDirAsync>d__51 <ReadCurrentForegroundDirAsync>d__ = new FanucSeries0i.<ReadCurrentForegroundDirAsync>d__51();
			<ReadCurrentForegroundDirAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<string>>.Create();
			<ReadCurrentForegroundDirAsync>d__.<>4__this = this;
			<ReadCurrentForegroundDirAsync>d__.<>1__state = -1;
			<ReadCurrentForegroundDirAsync>d__.<>t__builder.Start<FanucSeries0i.<ReadCurrentForegroundDirAsync>d__51>(ref <ReadCurrentForegroundDirAsync>d__);
			return <ReadCurrentForegroundDirAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.SetDeviceProgsCurr(System.String)" />
		// Token: 0x06001F7F RID: 8063 RVA: 0x00099380 File Offset: 0x00097580
		[DebuggerStepThrough]
		public Task<OperateResult> SetDeviceProgsCurrAsync(string programName)
		{
			FanucSeries0i.<SetDeviceProgsCurrAsync>d__52 <SetDeviceProgsCurrAsync>d__ = new FanucSeries0i.<SetDeviceProgsCurrAsync>d__52();
			<SetDeviceProgsCurrAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult>.Create();
			<SetDeviceProgsCurrAsync>d__.<>4__this = this;
			<SetDeviceProgsCurrAsync>d__.programName = programName;
			<SetDeviceProgsCurrAsync>d__.<>1__state = -1;
			<SetDeviceProgsCurrAsync>d__.<>t__builder.Start<FanucSeries0i.<SetDeviceProgsCurrAsync>d__52>(ref <SetDeviceProgsCurrAsync>d__);
			return <SetDeviceProgsCurrAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.ReadCurrentDateTime" />
		// Token: 0x06001F80 RID: 8064 RVA: 0x000993CC File Offset: 0x000975CC
		[DebuggerStepThrough]
		public Task<OperateResult<DateTime>> ReadCurrentDateTimeAsync()
		{
			FanucSeries0i.<ReadCurrentDateTimeAsync>d__53 <ReadCurrentDateTimeAsync>d__ = new FanucSeries0i.<ReadCurrentDateTimeAsync>d__53();
			<ReadCurrentDateTimeAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<DateTime>>.Create();
			<ReadCurrentDateTimeAsync>d__.<>4__this = this;
			<ReadCurrentDateTimeAsync>d__.<>1__state = -1;
			<ReadCurrentDateTimeAsync>d__.<>t__builder.Start<FanucSeries0i.<ReadCurrentDateTimeAsync>d__53>(ref <ReadCurrentDateTimeAsync>d__);
			return <ReadCurrentDateTimeAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.ReadCurrentProduceCount" />
		// Token: 0x06001F81 RID: 8065 RVA: 0x00099410 File Offset: 0x00097610
		[DebuggerStepThrough]
		public Task<OperateResult<int>> ReadCurrentProduceCountAsync()
		{
			FanucSeries0i.<ReadCurrentProduceCountAsync>d__54 <ReadCurrentProduceCountAsync>d__ = new FanucSeries0i.<ReadCurrentProduceCountAsync>d__54();
			<ReadCurrentProduceCountAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<int>>.Create();
			<ReadCurrentProduceCountAsync>d__.<>4__this = this;
			<ReadCurrentProduceCountAsync>d__.<>1__state = -1;
			<ReadCurrentProduceCountAsync>d__.<>t__builder.Start<FanucSeries0i.<ReadCurrentProduceCountAsync>d__54>(ref <ReadCurrentProduceCountAsync>d__);
			return <ReadCurrentProduceCountAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.CNC.Fanuc.FanucSeries0i.ReadExpectProduceCount" />
		// Token: 0x06001F82 RID: 8066 RVA: 0x00099454 File Offset: 0x00097654
		[DebuggerStepThrough]
		public Task<OperateResult<int>> ReadExpectProduceCountAsync()
		{
			FanucSeries0i.<ReadExpectProduceCountAsync>d__55 <ReadExpectProduceCountAsync>d__ = new FanucSeries0i.<ReadExpectProduceCountAsync>d__55();
			<ReadExpectProduceCountAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<int>>.Create();
			<ReadExpectProduceCountAsync>d__.<>4__this = this;
			<ReadExpectProduceCountAsync>d__.<>1__state = -1;
			<ReadExpectProduceCountAsync>d__.<>t__builder.Start<FanucSeries0i.<ReadExpectProduceCountAsync>d__55>(ref <ReadExpectProduceCountAsync>d__);
			return <ReadExpectProduceCountAsync>d__.<>t__builder.Task;
		}

		/// <summary>
		/// 构建读取一个命令的数据内容
		/// </summary>
		/// <param name="code">命令码</param>
		/// <param name="a">第一个参数内容</param>
		/// <param name="b">第二个参数内容</param>
		/// <param name="c">第三个参数内容</param>
		/// <param name="d">第四个参数内容</param>
		/// <param name="e">第五个参数内容</param>
		/// <returns>总报文信息</returns>
		// Token: 0x06001F83 RID: 8067 RVA: 0x00099498 File Offset: 0x00097698
		public byte[] BuildReadSingle(ushort code, int a, int b, int c, int d, int e)
		{
			byte[] array = new byte[28];
			array[1] = 28;
			array[3] = 1;
			array[5] = 1;
			base.ByteTransform.TransByte(code).CopyTo(array, 6);
			base.ByteTransform.TransByte(a).CopyTo(array, 8);
			base.ByteTransform.TransByte(b).CopyTo(array, 12);
			base.ByteTransform.TransByte(c).CopyTo(array, 16);
			base.ByteTransform.TransByte(d).CopyTo(array, 20);
			base.ByteTransform.TransByte(e).CopyTo(array, 24);
			return array;
		}

		/// <summary>
		/// 创建写入byte[]数组的报文信息
		/// </summary>
		/// <param name="code">命令码</param>
		/// <param name="a">第一个参数内容</param>
		/// <param name="b">第二个参数内容</param>
		/// <param name="c">第三个参数内容</param>
		/// <param name="d">第四个参数内容</param>
		/// <param name="data">等待写入的byte数组信息</param>
		/// <returns>总报文信息</returns>
		// Token: 0x06001F84 RID: 8068 RVA: 0x00099540 File Offset: 0x00097740
		public byte[] BuildWriteSingle(ushort code, int a, int b, int c, int d, byte[] data)
		{
			byte[] array = new byte[28 + data.Length];
			base.ByteTransform.TransByte((ushort)array.Length).CopyTo(array, 0);
			array[3] = 1;
			array[5] = 1;
			base.ByteTransform.TransByte(code).CopyTo(array, 6);
			base.ByteTransform.TransByte(a).CopyTo(array, 8);
			base.ByteTransform.TransByte(b).CopyTo(array, 12);
			base.ByteTransform.TransByte(c).CopyTo(array, 16);
			base.ByteTransform.TransByte(d).CopyTo(array, 20);
			base.ByteTransform.TransByte(data.Length).CopyTo(array, 24);
			bool flag = data.Length != 0;
			if (flag)
			{
				data.CopyTo(array, 28);
			}
			return array;
		}

		/// <summary>
		/// 创建写入单个double数组的报文信息
		/// </summary>
		/// <param name="code">功能码</param>
		/// <param name="a">第一个参数内容</param>
		/// <param name="b">第二个参数内容</param>
		/// <param name="c">第三个参数内容</param>
		/// <param name="d">第四个参数内容</param>
		/// <param name="data">等待写入的double数组信息</param>
		/// <returns>总报文信息</returns>
		// Token: 0x06001F85 RID: 8069 RVA: 0x00099618 File Offset: 0x00097818
		public byte[] BuildWriteSingle(ushort code, int a, int b, int c, int d, double[] data)
		{
			byte[] array = new byte[data.Length * 8];
			for (int i = 0; i < data.Length; i++)
			{
				this.CreateFromFanucDouble(data[i]).CopyTo(array, 0);
			}
			return this.BuildWriteSingle(code, a, b, c, d, array);
		}

		/// <summary>
		/// 创建读取运行程序的报文信息
		/// </summary>
		/// <param name="program">程序号</param>
		/// <returns>总报文</returns>
		// Token: 0x06001F86 RID: 8070 RVA: 0x0009966C File Offset: 0x0009786C
		public byte[] BuildReadProgram(int program)
		{
			return "\r\na0 a0 a0 a0 00 01 15 01 02 04 00 00 00 01 4f 36\r\n30 30 32 2d 4f 36 30 30 32 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n00 00 00 00 00 00 00 00 00 00 00 00 00 00\r\n".ToHexBytes();
		}

		/// <summary>
		/// 创建多个命令报文的总报文信息
		/// </summary>
		/// <param name="commands">报文命令的数组</param>
		/// <returns>总报文信息</returns>
		// Token: 0x06001F87 RID: 8071 RVA: 0x0009968C File Offset: 0x0009788C
		public byte[] BuildReadArray(params byte[][] commands)
		{
			MemoryStream memoryStream = new MemoryStream();
			memoryStream.Write(new byte[]
			{
				160,
				160,
				160,
				160,
				0,
				1,
				33,
				1,
				0,
				30
			}, 0, 10);
			memoryStream.Write(base.ByteTransform.TransByte((ushort)commands.Length), 0, 2);
			for (int i = 0; i < commands.Length; i++)
			{
				memoryStream.Write(commands[i], 0, commands[i].Length);
			}
			byte[] array = memoryStream.ToArray();
			base.ByteTransform.TransByte((ushort)(array.Length - 10)).CopyTo(array, 8);
			return array;
		}

		/// <summary>
		/// 从机床返回的数据里解析出实际的数据内容，去除了一些多余的信息报文。
		/// </summary>
		/// <param name="content">返回的报文信息</param>
		/// <returns>解析之后的报文信息</returns>
		// Token: 0x06001F88 RID: 8072 RVA: 0x00099720 File Offset: 0x00097920
		public List<byte[]> ExtraContentArray(byte[] content)
		{
			List<byte[]> list = new List<byte[]>();
			int num = (int)base.ByteTransform.TransUInt16(content, 0);
			int num2 = 2;
			for (int i = 0; i < num; i++)
			{
				ushort num3 = base.ByteTransform.TransUInt16(content, num2);
				list.Add(content.SelectMiddle(num2 + 2, (int)(num3 - 2)));
				num2 += (int)num3;
			}
			return list;
		}
	}
}
